import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '创建日期',
    align: "center",
    sorter: true,
    dataIndex: 'createTime'
  },
  {
    title: '业务日期',
    align: "center",
    sorter: true,
    dataIndex: 'businessDate',
    customRender:({text}) =>{
      text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
      return text;
    },
  },
  {
    title: '销售组织',
    align: "center",
    sorter: true,
    dataIndex: 'salesOrganization'
  },
  {
    title: '部门',
    align: "center",
    sorter: true,
    dataIndex: 'department'
  },
  {
    title: '客户',
    align: "center",
    sorter: true,
    dataIndex: 'client'
  },
  {
    title: '物料分组',
    align: "center",
    sorter: true,
    dataIndex: 'materialGroup'
  },
  {
    title: '金额',
    align: "center",
    sorter: true,
    dataIndex: 'amount'
  },
  {
    title: '备注',
    align: "center",
    sorter: true,
    dataIndex: 'remark'
  },
];

// 高级查询数据
export const superQuerySchema = {
  createTime: {title: '创建日期',order: 0,view: 'datetime', type: 'string',},
  businessDate: {title: '业务日期',order: 1,view: 'date', type: 'string',},
  salesOrganization: {title: '销售组织',order: 2,view: 'text', type: 'string',},
  department: {title: '部门',order: 3,view: 'text', type: 'string',},
  client: {title: '客户',order: 4,view: 'text', type: 'string',},
  materialGroup: {title: '物料分组',order: 5,view: 'text', type: 'string',},
  amount: {title: '金额',order: 6,view: 'number', type: 'number',},
  remark: {title: '备注',order: 7,view: 'text', type: 'string',},
};
